<!DOCTYPE html>
<html lang='en' xmlns:th='http://www.thymeleaf.org'>
<head>
	<meta charset='UTF-8'>
	<title>分类添加</title>
	<link rel='stylesheet' href='../../static/css/style.css' th:href='@{http://localhost:8080/css/style.css}'>
	<link rel='stylesheet' href='../../static/layui/css/layui.css'
		  th:href='@{http://localhost:8080/layui/css/layui.css}'>
	<script src='../../static/js/jquery.js'
			th:src='@{http://localhost:8080/webjars/jquery/3.6.0/jquery.min.js}'></script>
	<script src='../../static/layui/layui.js' th:src='@{http://localhost:8080/layui/layui.js}'></script>

	<link rel='stylesheet' href='../../static/css/man/product.css'
		  th:href='@{http://localhost:8080/css/man/product.css}'>
	<script src='../../static/js/man/product.js' th:src='@{http://localhost:8080/js/man/product.js}'></script>
</head>
<body>
<h1>产品添加</h1>
<hr>

<!--添加及删除按钮-->
<div class="layui-inline">
	<button class="layui-btn-lg layui-bg-blue " id="product_btn_add" type="button">添加产品</button>
	<button class="layui-btn-lg layui-bg-red " id="product_btn_del" type="button">删除选中</button>
</div>

<datalist id="brand_select">
	<option th:each="brand : ${brands}" th:data-id="${brand.id}" th:text="${brand.name}"></option>
	<!--/*-->
	<option data-id="1" data-value="brand" value="brand01"></option>
	<option data-id="2" data-value="brand" value="brand02"></option>
	<option data-id="3" data-value="brand" value="brand03"></option>
	<!--*/-->
</datalist>
<datalist id="variety_select">
</datalist>
<datalist id="type_select">
</datalist>

<datalist id="supplier_data">
		<option th:each="supplier : ${suppliers}" th:text="${supplier}"></option>
		<!--/*-->
		<option>supplier_data1</option>
		<option>supplier_data2</option>
		<option>supplier_data3</option>
		<!--*/-->
</datalist>
<datalist id="contact_data"></datalist>
<datalist id="telephone_data"></datalist>

<form action="/products/addList" method="post" id="product_from">
	<hr>
	<!--编号-->
	<h3 id="warehouse_id">订单编号:&nbsp;&nbsp;&nbsp;<span th:text="${warehouseId}"></span></h3>
	<input type="hidden" th:value="${warehouseId}" name="warehouseId">
	<hr>
	<!--供应商信息-->
	<div class="layui-inline layui-container">
		<fieldset style="border: 1px solid gray;  padding:0 0 20px 20px;">
			<legend style="margin: 0 0 10px 38.2%;">供应商信息</legend>
			<div class="layui-input-inline supplier">
				<input type="text" name="supplier" id="supplier_input" class="layui-btn-sm product_ipts" placeholder="选择供应商或输入供应商"
					   list="supplier_data">
			</div>
			<div class="layui-input-inline supplier">
				<input type="text" name="contact" id="contact_input" class="layui-btn-sm product_ipts" placeholder="选择联系人或输入联系人"
					   list="contact_data">
			</div>
			<div class="layui-input-inline supplier">
				<input type="text" name="telephone" id="telephone_input"  class="layui-btn-sm product_ipts" placeholder="选择手机号或输入手机号"
					   list="telephone_data">

			</div>
		</fieldset>
	</div>
	<hr>
	<!--table-->
	<div id="product_table_div">
		<table id="product_table" class="layui-table layui-container " width="800px;">
			<tr>
				<th>选择</th>
				<th>品牌</th>
				<th>产品名称</th>
				<th>型号</th>
				<th>规格</th>
				<th>单位</th>
				<th>数量</th>
				<th>单价</th>
				<th>金额</th>
			</tr>
			<tr>
				<td>
					<label class='label_checkbox'>
						<input type='checkbox' class='checkbox_choose'  name='product_checkbox' >
					</label>
				</td>
				<td>
					<input type='text' name='brandName' class='brand_input product_ipts' id="brand_select_ipt" style='width: 200px;' placeholder='选择品牌' list='brand_select'>
				</td>
				<td>
					<input type='text'  name='varietyName' class='variety_input product_ipts' style='width: 200px;' placeholder='选择品种' id="variety_select_ipt" list='variety_select'>
				</td>
				<td>
					<input type='text' id='type_input' name='typeName' class='product_ipts' style='width: 200px;' placeholder='选择类型'  list='type_select'>
				</td>
				<td>
					<input type='text' class='product_ipts' name='standard'>
				</td>
				<td>
					<input type='text' class='product_ipts' style='width: 60px;' name='units'>
				</td>
				<td>
					<input type='text' class='count_input product_ipts' style='width: 60px;' name='count'>
				</td>
				<td>
					<input type='text' class='price_input product_ipts' name='price'>
				</td>
				<td>
					<input type='text' class='money_input product_ipts' name='money'>
				</td>
			</tr>
		</table>
		<hr>
		<input type='text' class='product_ipts' name='remark' style="width: 100%; height: 35px;" placeholder="请输入备注">
	</div>


	<button class="layui-btn-lg layui-bg-green" id="product_submit" type="submit">入库</button>

</form>
</body>
</html>